#ifndef _DEF_INC_CACTION
#define _DEF_INC_CACTION
#pragma once
#include "CSeaAmp.h"

CML_NAMESPACE_USE();



class CAction
{
public:
	CAction(void);
	CAction( CSeaAmp &seaAmp, int id );
	virtual ~CAction();

	bool Init( CSeaAmp &seaAmp, int id );
	bool UnInit( void );

	virtual void DoAct( void );
	int getActionID( void );

	bool EnableAction();
	bool DisableAction();

	/// Return a reference to the CSeaAmp object 
	/// associated with this action
	/// @return The CSeaAmp object 
	CSeaAmp &GetSeaAmp(void){
		return *sa;
	}

	/// Return true if this receiver has been initialized
	/// @return True if initialized
	bool IsInitialized( void )
	{
		return sa != 0;
	}

protected:
	CSeaAmp *sa;

private:
	int id;
	CAction *next;
	friend class CSeaAmp;
};

#endif

